IOS release.20081217
From BroadOn
Contents |
[edit] SOFTWARE RELEASE REQUEST
Release Date: December 17, 2008
[edit] APPLICATION FOR RELEASE
This is a release candidate of IOS firmware that contains the following feature enhancements and one bug fix:
- SDHC support
- ES API to change IOS priority
- DI optimization for hash checking
- IPC buffer increase
- FS fix for inode name buffer oveflow (bug fix)
- ES support to allow Shop channels to access content 0
- FS API to reserve space (disabled by default)
Please note that the firmware version of this release is the same as that from Alpha2 version which was released on November 16, 2008 (tag ios_release_081124153248). Therefore, this release only contains updated PPC shim layer (FS and SD), tests and documents.
Since this release is based on the top-of-trunk of our CVS source tree and includes other important fixes/features from previous versions:
- ios_release_080909195524
- Enable PPC to own 7-seg LED gpio bits (bit 19-24) after IOS takes PPC out of reset.
- ios_release_080711142850_branch_081010115115
- Fix for common key2 overwriting backup key.
Since most of the feature enhancements would require changes to the appropriate PPC shim layers, there is a strict dependency between these updated shim layers and the released IOS version.
Each of the changes is described in more detail in the section CHANGES below. Please note that this software release is of Beta quality and should only be used internally within Nintendo for testing and evaluation purpose.
[edit] CHANGES
[edit] SDHC Support
1. Background of the Change Request
- Purpose of the Change
- To support the usage of SDHC memory cards in upcoming Wii Menu 4.0.
- Requestor of the Change
- Nintendo
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- See the word document "IOS Changes for Wii Menu 4.0" for more info.
- List modules, code, or entities that were modified for the change
- In addition to the changes of the SD state machine in SD RM, both PPC and IOP shim layers have been modified.
- PPC shim layer (tag SDHC_DEV_BRANCH)
- SDK/include/private/{sdi.h, sd_api.h}
- SDK/build/libraries/sdi/src/sdi_api.c
- Updated all read/write and get card size APIs; removed obsolete APIs
- IOP (tag ios_release_081124153248)
- ng/sw/rvl/include/{sdi.h, sd_api.h}
- ng/sw/rvl/os/sdi/sdi_mgr.c (SD RM)
- Update state machine to match Fig 4.2 (page 20) of SD Physical Layer Spec Version 2.00.
- ng/sw/rvl/lib/sdi/sdi_api.c (shim layer)
- Updated all read/write and get card size APIs; removed obsolete APIs
- List modules, code, or entities that will be affected by the change
- Since this change affects existing APIs, all applications that use previous SD library will need to be modified and recompiled. The meaning of the arguments used in the data transfer and card size APIs has been changed from number of bytes to number of blocks (where one block = 512 bytes). Some of the modules that require changes are:
- eSOL FA library and tests
- Directed SD tests (on IOP and PPC)
- abuse
- ehci support for printing debug messages to SD card
- Since this change affects existing APIs, all applications that use previous SD library will need to be modified and recompiled. The meaning of the arguments used in the data transfer and card size APIs has been changed from number of bytes to number of blocks (where one block = 512 bytes). Some of the modules that require changes are:
3. Testing Procedure
- List tests that were performed to validate this change
- White box testing to verify state machine modifications are correct by using different card types (SD, SDHC, MMC).
- Directed tests (on both IOP and PPC)
- PPC:
- SDK/build/tests/sdi/src/sdi_test.c
- SDK/build/tests/sdi/src/sdi_mount.c
- SDK/build/tests/sdi/src/sdi_reset.c
- SDK/build/tests/sdi/src/sdi_probe.c
- SDK/build/tests/sdi/src/sdi_sync.c
- SDK/build/tests/sdi/src/sdi_async.c
- IOP: NG/sw/rvl/tests/sdi/sdi_test.c
- PPC:
- eSOL FA tests (on SDHC_DEV_BRANCH)
- abuse running with both SD and SDHC cards
- Negative tests
- SDK/build/tests/sdi_probe_err.c
- SDK/build/tests/sdi_mount_err.c
- SDK/build/tests/sdi_getdevicestatus_err.c
- SDK/build/tests/sdi_readcardreg_err.c
- SDK/build/tests/sdi_devintrhandler_err.c
- SDK/build/tests/sdi_read_err.c
- SDK/build/tests/sdi_write_err.c
- SDK/build/tests/sdi_readmulti_err.c
- SDK/build/tests/sdi_writemulti_err.c
- Performance test
- PPC: SDK/build/tests/sdi/src/sdi_perf.c
- PPC: SDK/build/tests/sdi/src/sdi_perf_multi.c
- List test criteria that were used to determine that testing was successful
- eSOL FA tests and directed tests should pass.
- Run FA and SD tests using cards of different types and sizes (SDHC: 4GB, 8GB, 32GB, SD: 16MB, 256MB, 512MB, 1GB, 2GB)
- abuse should be able to run for at least 4 hours
4. Caveats and Known Issues
- Additional testing using different SDHC and SD memory cards is needed.
- Review of all SD directed tests to make sure that negative and boundary condition testing are covered.
- Additional analysis and measurement of card read/write performance is needed.
- Please note that this release does not support high-speed mode for SD/SDHC cards. It was determined by performance measurements that high-speed mode is not required. The evaluation code in the PPC shim layer for the ISD API still contains code to support high speed mode for SDHC cards. This code is disabled by default and should not be used.
[edit] IOS Priority Change API
1. Background of the Change Request
- Purpose of the Change
- To allow PPC to change the priority of some non-critical processes.
- Requestor of the Change
- Nintendo
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- See the word document "Priorities in IOP OS" for more info on the API definitions.
- List modules, code, or entities that were modified for the change
- For this feature, the changes are in IOS Kernel, ES RM, and both PPC and IOP shim layers. In most part, these changes are new code and do not affect existing code except for a small portion in the thread creation (IOS_CreateThread) routine.
- PPC shim layer (tag SDHC_DEV_BRANCH)
- SDK/include/private/iostypes.h
- Added IOS process IDs
- SDK/include/private/iospriority.h (new)
- SDK/include/private/es.h
- Added declaration of new APIs.
- SDK/include/secure/estypes.h
- Added new type ESPidPriority.h
- SDK/build/libraries/es/src/es.c
- Added two new ES APIs.
- SDK/include/private/iostypes.h
- IOP (tag ios_release_081124153248)
- ng/sw/rvl/include/iostypes.h
- Added new type IOSPidPriority.h
- ng/sw/rvl/os/ios/thread.c (kernel)
- In IOS_CreateThread(), added code to save the highest priority for a given process to new internal structure.
- Added two new system calls to support new ES APIs.
- client/sw/common/include/estypes.h (ES RM)
- Added new type ESPidPriority.h
- client/sw/common/os/es/es_mgr.c (ES RM)
- client/sw/common/os/es/es_utils.c (ES RM)
- Added code to handle the two new APIs and make IOS system calls
- client/sw/common/lib/es/{es.c, es.h} (shim layer)
- Added two new ES APIs.
- ng/sw/rvl/include/iostypes.h
- List modules, code, or entities that will be affected by the change
- Since this change does NOT affect existing APIs, only applications that want to use the new APIs will need to be relinked with the new ES shim layer.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new directed ES test on both PPC and IOP.
- PPC (tag SDHC_DEV_BRANCH):
- SDK/build/tests/es/src/es_chgpridemo.c
- SDK/build/tests/es/src/es_chgpritest.c
- IOP (tag ios_release_081124153248)
- client/sw/common/lib/es/test/es_chgpritest.c
- ng/sw/rvl/os/tests/pri.c
- Updated "abuse" to use new APIs to toggle IOS priority for DI, OHCI0, and OHCI1 between default values and new lower values by using button "R". If "abuse" is built with profiling enabled (ENABLE_IOS_PROFILE=1), user can see the priority of all threads in OHCI0 and OHCI1 updated as well.
- PPC (tag SDHC_DEV_BRANCH):
- Added new directed ES test on both PPC and IOP.
- List test criteria that were used to determine that testing was successful
- New directed tests should pass on both PPC and IOP.
- abuse should be able to run for at least 4 hours with modified IOS priority for DI, OHCI0, and OHCI1.
4. Caveats and Known Issues
- Review new directed test to make sure that negative and boundary conditions are covered.
[edit] DI Hash Check Optimization
1. Background of the Change Request
- Purpose of the Change
- To reduce the processing overhead that DI RM has incurred on IOP.
- Requestor of the Change
- Nintendo
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- List modules, code, or entities were modified for the change
- This change only affects IOP components: kernel and DI RM. Although the multi-level hash checking algorithm remains the same, its implementation is new due to the restructure of the code.
- IOP (tag ios_release_081124153248)
- ng/sw/rvl/os/ios/crypto.c (kernel)
- Added new system call to perform DI hash check
- ng/sw/rvl/os/di/dvd_low_rvl.c (DI RM)
- Modified routine doBlockRead() to use new system call to perform hash checking.
- ng/sw/rvl/os/ios/crypto.c (kernel)
- IOP (tag ios_release_081124153248)
- This change only affects IOP components: kernel and DI RM. Although the multi-level hash checking algorithm remains the same, its implementation is new due to the restructure of the code.
- List modules, code, or entities that will be affected by the change
- Since this change will be executed when hashed encrypted disk is used, all applications will be indirectly affected.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new directed test on both PPC and IOP.
- PPC (tag SDHC_DEV_BRANCH):
- SDK/build/tests/dvd/src/dvdreadtest3.c (can be compiled to read entire single-layer or dual-layer disc)
- IOP (tag ios_release_081124153248)
- ng/sw/rvl/os/tests/dicheck.c
- PPC (tag SDHC_DEV_BRANCH):
- Positive testing is performed by simply running any encrypted disc successfully.
- Run new test (dvdreadtest3.elf) to do read of all physical blocks on single-layer and dual-layer RVM images.
- Run all applicable PPC di/dvd tests and dvd demos, including but not limited to:
- TestDVDLow.elf, TestDVDLowPartition.elf
- di_dvdlowtest.elf (new), di_partition.elf (new), di_partition_error.elf (new), verify_files.elf
- Run SDK/build/tests/dvd/src/dvdreadtest2.c from an RVT-R single layer disc to measure profiling data
- Run "abuse" from an RVM image
- Negative testing is performed by running a RVM image with differnt corrupted hashes (data subblocks, H0, H1, H2, and H3).
- Negative testing against hacked "tmd" & "ticket" using modified rvl.bin.
- Added new directed test on both PPC and IOP.
- List test criteria that were used to determine that testing was successful
- Application run from RVM image or real disc should pass.
- All existing di/dvd tests should pass.
- Negative tests should trigger all the hash check failure conditions: subblock not matching H0, H0 hash not verified, H1 hash not verified, H2 hash not verified, and H3 hash not verified.
4. Caveats and Known Issues
- Review new directed test to make sure that negative and boundary conditions are covered.
[edit] IPC Buffer Increase
1. Background of the Change Request
- Purpose of the Change
- To support additional PPC IPC requests and increase IOP async requests between threads
- Requestor of the Change
- Nintendo
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- List modules, code, or entities were modified for the change
- PPC shim layer (tag SDHC_DEV_BRANCH)
- SDK/build/libraries/ipc/src/ipcclt.c
- Increased IPC queue size to match IOP
- SDK/build/libraries/ipc/src/ipcclt.c
- IOP (tag ios_release_081124153248)
- ng/sw/rvl/os/ios/ipcsrv.c (kernel)
- Increased IPC queue size and maximum in-flight size
- ng/sw/rvl/os/ios/resource.c (kernel)
- Increased maximum value for system wide async calls, max async calls per thread, and max IPC async calls.
- Added a check to determine if the resource request comes from IPC thread and use the correct max value for IPC async calls.
- ng/sw/rvl/os/ios/ipcsrv.c (kernel)
- PPC shim layer (tag SDHC_DEV_BRANCH)
- List modules, code, or entities that will be affected by the change
- Since this change increases the number of IPC messages supported on PPC and also the number of async calls that IOS can support amongst threads, all PPC applications and IOS RMs are indirectly affected.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new directed tests on PPC and IOP:
- SDK/build/tests/usrb/src/ipctest.c (PPC)
- Test for async calls against BroadOn OHCI0 (that supports dummy ioctl)
- ng/sw/rvl/os/tests/ipcsysmax.c (IOP)
- Test to check the system-wide limit of ioctl async calls
- ng/sw/rvl/os/tests/ipcmax.c (IOP)
- Test to check the thread limit of ioctl async calls
- SDK/build/tests/usrb/src/ipctest.c (PPC)
- abuse (with networking) should be run for at least 4 hours
- Added new directed tests on PPC and IOP:
- List test criteria that were used to determine that testing was successful
- All above directed tests should report correct information.
- No error from "abuse" run.
4. Caveats and Known Issues
- Review directd test to make sure that boundary conditions are covered.
- Please note that in order to run the PPC-based test, tests/usb/src/ipctest.c, a special version of the OH0 resource manager is needed. The source patch to add a dummy ioctl used by the IPC test has been provided. This patch should not be used in production versions of the OH0 resource manager.
[edit] FS Fix for Inode Name Buffer Overflow
1. Background of the Change Request
- Purpose of the Change
- To fix a buffer overflow problem when an FS API is passed a file or directory name that is longer than 43 characters. The problem is caused by an incorrect size specified for a buffer on the stack that is used to parse the path name.
- Requestor of the Change
- BroadOn
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- See the word document "IOS Changes for Wii Menu 4.0" for more info. The change is only in IOP FS RM.
- List modules, code, or entities were modified for the change
- IOP (tag ios_release_081124153248)
- client/sw/common/os/fs/fs_ops.c (FS RM)
- Increased the buffer size used for path name to be correct value.
- client/sw/common/os/fs/fs_ops.c (FS RM)
- IOP (tag ios_release_081124153248)
- List modules, code, or entities that will be affected by the change
- This check is performed against all FS APIs that accept file or directory name as input arguments.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new test to PPC:
- PPC (tag SDHC_DEV_BRANCH):
- SDK/build/tests/fs/src/fs_longname.c
- PPC (tag SDHC_DEV_BRANCH):
- All existing FS tests
- Run stress test for over 24 hours
- abuse (with networking) should be run for at least 4 hours
- Added new test to PPC:
- List test criteria that were used to determine that testing was successful
- New directed test should pass.
- All existing FS tests should pass.
- Stress test runs should not report any error.
- No error from "abuse" run.
4. Caveats and Known Issues
- Review new directed test to make sure that negative and boundary conditions are covered.
[edit] ES Open Title Content Change
1. Background of the Change Request
- Purpose of the Change
- To allow all Shop channels to access content index 0 of any title.
- Requestor of the Change
- Nintendo
- Target of the Change
- Wii Menu 4.0 to be released in March 2009.
2. Details of the Change
- See the word document "IOS Changes for Wii Menu 4.0" for more info. The change is only in the IOP ES RM.
- List modules, code, or entities that were modified for the change
- IOP (tag ios_release_081124153248)
- client/sw/common/os/es/es_title.c (ES RM)
- Modified ES_OpenTitleContentFile() API to allow all Shop channels to access content index 0.
- client/sw/common/os/es/es_title.c (ES RM)
- IOP (tag ios_release_081124153248)
- List modules, code, or entities that will be affected by the change
- This change would affect all applications that use ES_OpenTitleContentFile() API.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new tests to PPC:
- PPC (tag SDHC_DEV_BRANCH):
- SDK/build/tests/es/src/es_opencontent.c
- SDK/build/tests/es/src/es_shopcontent.c
- SDK/build/tests/es/makefile changed to publish es_shopcontent test with various titleIDs to test positive and negative cases
- PPC (tag SDHC_DEV_BRANCH):
- All existing ES tests
- Added new tests to PPC:
- List test criteria that were used to determine that testing was successful
- New directed tests should pass.
- All existing ES tests should pass.
4. Caveats and Known Issues
- Review new directed tests to make sure that negative and boundary conditions are covered.
[edit] FS Reserve Space API (Disabled by default)
1. Background of the Change Request
- Since Nintendo does NOT have any plan to use this API at this time, this feature has been disabled in the PPC FS shim layer. If desired, this feature can be enabled but should only be used for internal evaluation purpose. Additional stress and compatibility testing are required for official release.
- Purpose of the Change
- To allow reserving file system space (inodes and flash blocks) without actually writing dummy data into the file system.
- Requestor of the Change
- Nintendo
- Target of the Change
- Potential target for post-Wii Menu 4.0 release.
2. Details of the Change
- See the word document "IOS Changes for Wii Menu 4.0" for more info.
- Currently, this feature is disabled in the PPC FS shim layer by default. To activate its usage, need to compile FS shim layer and tests with FS_RESERVESPACE flag enabled. A different FS library "fs_reserve[D].a" is created when this flag is set.
- List modules, code, or entities were modified for the change
- PPC shim layer (tag SDHC_DEV_BRANCH)
- SDK/include/private/fs.h
- Added declaration of new APIs.
- SDK/build/libraries/fs/src/fs.c (New APIs are #ifdef with FS_RESERVESPACE)
- Added new APIs.
- SDK/include/private/fs.h
- IOP (tag ios_release_081124153248)
- client/sw/common/include/fs.h (FS RM)
- Added declaration of new APIs.
- client/sw/common/os/fs/fs_mgr.c (FS RM)
- Added support for new Iotclv command to support new API.
- client/sw/common/os/fs/fs_ops.c (FS RM)
- Added new routine to reserve space and restructured existing code to create file to support new API.
- client/sw/common/lib/fs/fs.c (shim layer)
- Added new APIs.
- client/sw/common/include/fs.h (FS RM)
- PPC shim layer (tag SDHC_DEV_BRANCH)
- List modules, code, or entities that will be affected by the change
- If the new API is used, the file system will be affected.
3. Testing Procedure
- List tests that were performed to validate this change
- Added new and updated existing tests on PPC and IOP:
- PPC (tag SDHC_DEV_BRANCH):
- SDK/build/tests/fs/src/fs_reservespace.c
- SDK/build/tests/fs/src/fs_reservespace_error.c
- SDK/build/tests/fs/src/fs_reservespace_stress.c
- SDK/build/tests/fs/src/fs_reservespace_stress_verify.c
- SDK/build/tests/fs/src/fs_stress.c (new test is enabled when FS_RESERVESPACE is set)
- IOP (tag ios_release_081124153248)
- client/sw/common/lib/fs/test/fs_reservespace.c
- PPC (tag SDHC_DEV_BRANCH):
- All existing FS tests
- Run updated stress test on Samsung and Hynix flash parts for over 24 hours
- abuse (with networking) should be run for at least 4 hours
- Added new and updated existing tests on PPC and IOP:
- List test criteria that were used to determine that testing was successful
- All above directed tests should report correct information.
- All existing FS tests should pass.
- Stress test runs should not report any error.
- No error from "abuse" run.
4. Caveats and Known Issues
- Review directed and stress tests to make sure that negative and boundary conditions are covered.
- Need to run FS stress tests (fs_stress.elf and fs_reservespace_stress.elf) on older IOSes to ensure backward compatibility with new IOS using ReserveSpace API.
[edit] APPROVALS
From BroadOn:
- Christopher Nguyen
From Nintendo:
